home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 6825 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.6 KB

  1. Path: keats.ugrad.cs.ubc.ca!not-for-mail
  2. From: c2a192@ugrad.cs.ubc.ca (Kazimir Kylheku)
  3. Newsgroups: comp.lang.ada,comp.lang.c,comp.realtime
  4. Subject: Re: ADA to C converter, the dream ?
  5. Date: 15 Feb 1996 07:45:50 -0800
  6. Organization: Computer Science, University of B.C., Vancouver, B.C., Canada
  7. Message-ID: <4fvkfeINN8cg@keats.ugrad.cs.ubc.ca>
  8. References: <4fn8bv$6d1@news.be.innet.net> <tgmDMoBMy.E94@netcom.com> <3121E777.304D@afit.af.mil>
  9. NNTP-Posting-Host: keats.ugrad.cs.ubc.ca
  10.  
  11. In article <3121E777.304D@afit.af.mil>,
  12. Rusty Baldwin  <rbaldwin@nvi.nvi.net> wrote:
  13. >Thomas G. McWilliams wrote:
  14. >
  15. >> There exists a good Pascal to C translator called p2c available
  16. >> in source code form (I think it might be GNU software). It might
  17. >> serve as a rough basis on which to build something like this.
  18. >> Perhaps you could run your Ada code through some Perl filters
  19. >> and post-process with p2c. Very hackish, I know. Maybe a Modula
  20. >> to C translator could be hacked more easily.
  21. >Why don't you use the gnat (Ada 95) compiler.  It is a front end to the
  22. >gcc compiler.  Perhaps there is a switch to generate C code??
  23.  
  24. Absolutely not. As someone in this thread already pointed out, gnat is a
  25. compiler, not a translator of the Ada language into GNU C.
  26.  
  27. It uses the code-generator "back end" that is common to the GNU C compiler,
  28. C++, g77 and so forth.
  29.  
  30. The compilers which share this back end must translate their input language
  31. into a special machine-independent parse tree data structure. The back end will
  32. take over from there to generate intermediate code and final target object
  33. code.
  34. -- 
  35.  
  36.